1. Field of the Invention
This invention relates to an image data generating apparatus using MIP (multum in parvo) mapping. In addition, this invention relates to an apparatus for generating data representative of a two-dimensional image in which at least one three-dimensional object is stereographically indicated. Furthermore, this invention relates to an apparatus which defines an object in three-dimensional space as a group of basic-shape polygons to render the object, which includes a buffer storing data representing a luminance and a depth value (that is, a distance from a visual point) corresponding to the position of each of pixels arranged in a grid on a screen, and which uses the data in the buffer and thereby generates data representative of an object-corresponding image with surfaces including ones hidden on the basis of the depth values.
2. Description of the Related Art
In a general method of generating image data which is based on computer graphics (CG), an object in three-dimensional space, that is, a target to be rendered, is defined as a group of basic-shape polygons, and a buffer stores data representing a luminance and a depth value (that is, a distance from a visual point) corresponding to the position of each of pixels arranged in a grid on a screen. Then, the data in the buffer are used, and thereby data are generated which represent an object-corresponding image with surfaces including ones hidden on the basis of the depth values. The object-corresponding image is determined by the visual point and a light-source point in three-dimensional space, and is one as viewed from the visual point.
Texture mapping and MIP (multum in parvo) mapping are techniques for making an object-corresponding image visually closer to an original object.
The texture mapping is as follows. A two-dimensional image (a two-dimensional pattern) is prepared as a texture source image. The two-dimensional image is called a texture pattern or a texture map. The texture pattern (the texture map) is applied to the surfaces of polygons forming an object to be rendered.
The MIP mapping is one type of the texture mapping. The MIP mapping implements interpolation with respect to pixel data so that a texture pattern applied to polygons can be prevented from becoming unnatural when an object moves relative to a visual point.
Specifically, the MIP mapping is a technique which works by having multiple texture maps for each texture, each rendered at a different resolution. Different texture maps are then used to represent the image at various distances. In other words, the MIP mapping includes creating a series of MIP maps for each texture map and storing in memory the MIP maps of each texture map associated with the object being rendered. A set of MIP maps for a texture map includes a base map that corresponds directly to the texture map as well as a series of related filtered maps, where each successive map is reduced in size by a factor in each of the texture map dimensions.
In the case where the resolutions of MIP maps applied to pixels composing an image of an object are equalized, data processing can be simple. In this case, when the object has a great depth and the MIP-map resolution is relatively high, texture patterns applied to places corresponding to deep portions of the object tend to have aliasing. On the other hand, when the MIP-map resolution is relatively low, applied texture patterns tend to be insufficient in resolution.
In the case where the resolution of a MIP map applied to each pixel is designed to depend on the depth value of the pixel, aliasing and insufficient resolutions can be prevented from occurring. Generally, MIP maps have different resolution levels equal to integers, respectively. A desired resolution level for a pixel is calculated from the depth value of the pixel. The desired resolution level for the pixel may differ from the MIP-map resolution levels. For example, the desired resolution level is “1.5” while the MIP-map resolutions are “1”, “2”, “3”, . . . . When the desired resolution level is “1.5”, data representative of a MIP map with a resolution level of “1” and data representative of a MIP map with a resolution level of “2” are read out from a memory. Then, the MIP map with a resolution level of “1” and the MIP map with a resolution level of “2” are combined into a mixed map corresponding to a resolution level of“1.5”. The mixed map is applied to the pixel.
In general, a two-dimensional image (MIP maps) applied to polygons is represented by a great amount of data. Dynamic random access memories (DRAMs) are large in capacity. It is known to use a DRAM in storing data representative of MIP maps with different resolution levels. In the case where a desired resolution level is “1.5”, data representative of a MIP map with a resolution level of “1” are read out from first given addresses of the DRAM. Then, data representative of a MIP map with a resolution level of “2” are read out from second given addresses of the DRAM before the two MIP maps are mixed.
During the read-out of data of a MIP map with one resolution level from the DRAM, sequentially-accessed addresses in the DRAM are discontinuous when the vertexes of a polygon and the positions of corresponding pixels are in a certain relation. A typical static random access memory (SRAM) is smaller in capacity than a typical DRAM. The feature of an SRAM is as follows. Data can be transferred from discontinuous addresses of an SRAM at a high rate. It is known that an SRAM is provided in addition to a DRAM, and data representative of a required portion of a two-dimensional image which has a desired resolution level are transferred from the DRAM to the SRAM before an image represented by the data in the SRAM is applied to a polygon.
In the event that a desired resolution level of a two-dimensional image applied to a polygon varies from pixel to pixel in the polygon, two-dimensional image data are transferred from the DRAM to the SRAM to update data in the SRAM for each of pixels in the polygon. Therefore, in this case, the data processing rate is relatively low.